package com.sxran.im.service;

import com.sxran.im.dao.ImUserMapper;
import com.sxran.im.info.ImGroup;
import com.sxran.im.info.ImUser;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.List;

@Slf4j
@Service
public class UserService {
    @Resource
    private ImUserMapper imUserMapper;

    public ImUser selectByUserId(String userId){
        // 用户基本信息
        ImUser imUser = imUserMapper.selectById(userId);
        // 朋友
        List<ImGroup> friends = new ArrayList<>();
        imUser.setFriends(friends);
        return imUser;
    }
}
